package com.fuershiye.woman.monitor.beans;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;


/**
 * 表中的ID和对应的名称
 * 
 * @author yongyongdong
 *
 */
public class IdName {

    private Long id;
    private String name;
    
    public IdName(){
		this.id = 0l;
    	this.name = "";
    }
    
    public IdName(Long id, String name){
    	if(id!= null){
    		this.id = id;
    	}else{
    		this.id = 0l;
    	}
    	this.name = name;
    }
    
    public IdName(Integer id, String name){
    	if(id!= null){
    		this.id = Long.valueOf(id);
    	}else{
    		this.id = 0l;
    	}
    	this.name = name;
    }
    
    public IdName(String id, String name){
    	if(StringUtils.isNotBlank(id)){
        	this.id = Long.valueOf(id);
    	}else{
        	this.id = 0l;
    	}
    	this.name = name;
    }
    
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
}
